from rest_framework import serializers

from course import models


class CourseSer(serializers.ModelSerializer):
    class Meta:
        model = models.Course
        fields = ['id','cname']

class CourseSerializer(serializers.ModelSerializer):
    children = CourseSer(many=True)
    class Meta:
        model = models.Course
        fields = "__all__"



